package com.example.dessertstoressm.controller;

import com.example.dessertstoressm.Service.CatalogService;
import com.example.dessertstoressm.Service.CategoryService;
import com.example.dessertstoressm.domain.Category;
import com.example.dessertstoressm.domain.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Controller
public class categoryController
{
//    @RequestMapping("/top/categoryForm")
//    @Autowired
//    public CatalogService catalogService;
//    public String Category( HttpServletRequest req)
//    {
//        String categoryId = req.getParameter("categoryId");
//        Category category = catalogService.getCategory(categoryId);
//        System.out.print(category.getName());//测试输出
//        List<Product> productList = catalogService.getProductListByCategory(categoryId);
//      return "catalog/catagory"  ;
//    }
}
